package org.dht.com.msg;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>
 * Java class for Data complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * <complexType name="Data">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="bytes" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
 *       </sequence>
 *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Data", propOrder = { "bytes" })
public class Data {

	/**
	 * Bytes of data
	 */
	@XmlElement(required = true)
	protected byte[] bytes;
	/**
	 * Data name
	 */
	@XmlAttribute(required = true)
	protected String name;

	/**
	 * Builds data empty
	 */
	Data() {

	}

	/**
	 * Builds data by name and bytes
	 * 
	 * @param name
	 *            Data name
	 * @param bytes
	 *            Bytes data
	 */
	public Data(String name, byte[] bytes) {
		this.bytes = bytes;
		this.name = name;
	}

	/**
	 * Gets the value of the bytes property.
	 * 
	 * @return possible object is byte[]
	 */
	public byte[] getBytes() {
		return bytes;
	}

	/**
	 * Sets the value of the bytes property.
	 * 
	 * @param value
	 *            allowed object is byte[]
	 */
	public void setBytes(byte[] value) {
		this.bytes = ((byte[]) value);
	}

	/**
	 * Gets the value of the name property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the value of the name property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setName(String value) {
		this.name = value;
	}

}
